/*
 * General.h
 *
 * Created: 11/13/2012 12:16:35 AM
 *  Author: Hp-Minion
 */ 


#ifndef GENERAL_H_
#define GENERAL_H_
/*****************************************************************************************/
/*
	INCLUDES
*/	
		#include "General.h"

/*****************************************************************************************/
/*
	DEFINES
	
*/	       
		/* Select the debug print level */
		#define SET_DEBUG_LVL 0
		
		/* Debug Level Selection */
		#if SET_DEBUG_LVL == 0
		#  define DEBUG_LVL_0
		#elif SET_DEBUG_LVL == 1
		#  define DEBUG_LVL_0
		#  define DEBUG_LVL_1
		#elif SET_DEBUG_LVL == 2
		#  define DEBUG_LVL_0
		#  define DEBUG_LVL_1
		#  define DEBUG_LVL_2
		#endif
		
		/* Modules Selection */
		//#define MODULE_PRESENT_HUM_TEMP
		#define MODULE_PRESENT_ADC_TEMP
		#define MUDULE_PRESENT_ADC_HUM
		#define MUDULE_PRESENT_ADC_LIGHT
		
		/* PIN Selection */
		
		/* DIGITAL PINS */
		#define ARDUINO_LED 13
		#define IN_TEMP_HUM_PIN 2
		#define OUT_TEMP_HUM_PIN 3

		/* ANALOG PINS */
        #define LIGHT_PIN 0
		#define SOIL_TEMP_PIN 1
		#define SOIL_MOISTURE_PIN 2
		
		/* Situational defines */
		#define ALERT_TIME 500
        
		/* General defines */
	    #define TRUE 1
        #define FALSE 0
/*****************************************************************************************/
/*
	VARIABLES
*/
        typedef enum {
			STATUS_CODE_SUCCESS,
			STATUS_CODE_FAIL,
			STATUS_CODE_ERROR,
			
			STATUS_CODE_UNDEFINED
			
		} StatusCodes;
			
		typedef struct {
			unsigned char humidity;
            unsigned char temperature;
		    
		} AreaConditions;
		
		typedef struct {
			unsigned long int systemClock;
			unsigned long int lifeTimer;
	        AreaConditions soil;
			AreaConditions indoorAir;
			AreaConditions outdoorAir;
			unsigned char environmentLight;
        } Context;

/*****************************************************************************************/
/*
	FUNCTION PROTOTYPES
*/	
	

/*****************************************************************************************/
#endif /* GENERAL_H_ */